{
	"info": {
		"_postman_id": "5648f015-e155-4c9a-be6b-b15cf60995ec",
		"name": "Протокол 1.3 Цитология",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "48020210",
		"_collection_link": "https://nst-sid-6186244.postman.co/workspace/nst-sid's-Workspace~d2a1dc8f-cae0-4166-807b-dc131f8f29a6/collection/48020210-5648f015-e155-4c9a-be6b-b15cf60995ec?action=share&source=collection_link&creator=48020210"
	},
	"item": [
		{
			"name": "Предварительные условия",
			"item": [
				{
					"name": "Достать врача и организацию из токена врача и добавить в переменную",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
									"console.log(jwt);\r",
									"if (jwt) {\r",
									"    let payload = jwt.split('.')[1];\r",
									"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
									"    while (payload.length % 4) payload += '=';\r",
									"    let decoded = JSON.parse(atob(payload));\r",
									"    console.log(decoded)\r",
									"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
									"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
									"    if (practitionerId) pm.environment.set(\"PractitionerId\", practitionerId);\r",
									"    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
									"} else {\r",
									"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
									"}"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "0.3.4934",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://postman-echo.com/get",
							"protocol": "https",
							"host": [
								"postman-echo",
								"com"
							],
							"path": [
								"get"
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать PractitionerRole врача (PractitionerRole)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
									"\r",
									"pm.environment.set(\"PractitionerRole\", practitionerRole);\r",
									"console.log(practitionerRole)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "practitioner",
									"value": "{{PractitionerId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать структурное подразделение врача (LocationId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"let json = pm.response.json();\r",
									"let locationValue = null;\r",
									"\r",
									"if (Array.isArray(json.entry)) {\r",
									"    for (let entry of json.entry) {\r",
									"        if (\r",
									"            entry.resource &&\r",
									"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
									"            Array.isArray(entry.resource.location) &&\r",
									"            entry.resource.location.length > 0\r",
									"        ) {\r",
									"            // Берём reference первого location и извлекаем только UUID\r",
									"            let ref = entry.resource.location[0].reference;\r",
									"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
									"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
									"            }\r",
									"            break;\r",
									"        }\r",
									"    }\r",
									"}\r",
									"\r",
									"if (locationValue) {\r",
									"    pm.environment.set(\"LocationId\", locationValue);\r",
									"    console.log(\"location сохранён:\", locationValue);\r",
									"} else {\r",
									"    console.log(\"location не найден\");\r",
									"}\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "_id",
									"value": "{{PractitionerRole}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "1. Создание направления на цитологическое исследование препарата из цервикального канала",
			"item": [
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Найти организацию-лабораторию (OrganizationId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let organizationId = jsonData.entry.find(obj => obj.resource.resourceType === \"Organization\").resource.id;\r",
									"\r",
									"pm.environment.set(\"OrganizationId_laboratory\", organizationId);\r",
									"console.log(organizationId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Organization?_id={{OrganizationId}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Organization"
							],
							"query": [
								{
									"key": "name",
									"value": "Учреждение здравоохранения \"Минский городской клинический онкологический центр\"",
									"description": "Если исследование проводится в цитологической лаборатории",
									"disabled": true
								},
								{
									"key": "_id",
									"value": "{{OrganizationId}}",
									"description": "Если исследование проводится внутри ОЗ"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Найти структурное подразделение лаборатории (LocationId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let locationId = jsonData.entry.find(obj => obj.resource.resourceType === \"Location\").resource.id;\r",
									"\r",
									"pm.environment.set(\"LocationId_laboratory\", locationId);\r",
									"console.log(locationId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Location?organization={{OrganizationId_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Location"
							],
							"query": [
								{
									"key": "organization",
									"value": "{{OrganizationId_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleGynecologyToLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionGynecologyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientWomenTest\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterGynecologistTest\"\r\n                },\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для жидкостной цитологии\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisHealthyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ServiceRequest/ExampleGynecologyCytologyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Specimen/ExampleSpecimenGynecology\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientWomenTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientWomenTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisHealthyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisHealthyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-10\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"Z00.0\",\r\n                            \"display\": \"Z00.0 - Общий медицинский осмотр\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientWomenTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-10\",\r\n                \"recordedDate\": \"2025-12-10\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterGynecologistTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"EncounterGynecologistTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterConclusion\",\r\n                        \"valueString\": \"Взята жидкостная цитология\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\",\r\n                            \"display\": \"Плановая медицинская помощь\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"Специализированная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientWomenTest\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-12-10T11:10:21Z\",\r\n                    \"end\": \"2025-12-10T11:25:21Z\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/EncounterReasons\",\r\n                                        \"code\": \"consult\",\r\n                                        \"display\": \"врачебная консультация\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisHealthyTest\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleGynecologyCytologyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleGynecologyCytologyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/Menstruation\",\r\n                                        \"valueDateTime\": \"2025-12-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/Contraception\",\r\n                                        \"valueString\": \"КОК\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/VaccinationHPV\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/DateVaccinationHPV\",\r\n                                        \"valueDateTime\": \"2022-07-18\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TestHPV\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/DateTestHPV\",\r\n                                        \"valueDateTime\": \"2022-06-18\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/GynecologyCytology\"\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfResearch\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C007\",\r\n                                    \"display\": \"Акушерство и гинекология\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PurposeOfResearch\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PurposeOfResearch\",\r\n                                    \"code\": \"screening\",\r\n                                    \"display\": \"скрининг\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"172\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"gynecology-cytology\",\r\n                                \"display\": \"Цитологическое исследование цервико-вагинальных мазков\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientWomenTest\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterGynecologistTest\"\r\n                },\r\n                \"authoredOn\": \"2025-12-10T11:15:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisHealthyTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"supportingInfo\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HormoneTherapy\",\r\n                                \"valueBoolean\": false\r\n                            },\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/HormonalDrugName\",\r\n                                        \"valueString\": \"Эутирокс\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/HormonePeriod\",\r\n                                        \"valuePeriod\": {\r\n                                            \"start\": \"2022-05-01\"\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HormonotherapyDetails\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/ExampleSpecimenGynecology\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Specimen/ExampleSpecimenGynecology\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Specimen\",\r\n                \"id\": \"ExampleSpecimenGynecology\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/BioMatSpecimen\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"25.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSBiologicalMaterial\",\r\n                            \"code\": \"12.11.4\",\r\n                            \"display\": \"Соскоб шейки матки и цервикального канала\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientWomenTest\"\r\n                },\r\n                \"collection\": {\r\n                    \"collector\": {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    },\r\n                    \"collectedDateTime\": \"2025-12-10\",\r\n                    \"method\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/MethodOfObtaining\",\r\n                                \"code\": \"scraping\",\r\n                                \"display\": \"соскоб\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    \"bodySite\": {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                    \"code\": \"Cervical-canal\",\r\n                                    \"display\": \"Цервикальный канал\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                },\r\n                \"processing\": [\r\n                    {\r\n                        \"method\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ColoringMicropreparations\",\r\n                                    \"code\": \"Native\",\r\n                                    \"display\": \"Не окрашивался\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"condition\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/StateOfSpecimen\",\r\n                                \"code\": \"COOL\",\r\n                                \"display\": \"Охлажденный\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "2. Заключение цитологического исследования препарата из ЦК",
			"item": [
				{
					"name": "Достать врача и организацию из токена врача лаборатории (PractitionerId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
									"console.log(jwt);\r",
									"if (jwt) {\r",
									"    let payload = jwt.split('.')[1];\r",
									"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
									"    while (payload.length % 4) payload += '=';\r",
									"    let decoded = JSON.parse(atob(payload));\r",
									"    console.log(decoded)\r",
									"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
									"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
									"    if (practitionerId) pm.environment.set(\"PractitionerId_laboratory\", practitionerId);\r",
									"    if (organizationId) pm.environment.set(\"OrganizationId_laboratory\", organizationId);\r",
									"} else {\r",
									"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
									"}"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "0.3.4934",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://postman-echo.com/get",
							"protocol": "https",
							"host": [
								"postman-echo",
								"com"
							],
							"path": [
								"get"
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать PractitionerRole врача лаборатории (PractitionerRole_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
									"\r",
									"pm.environment.set(\"PractitionerRole_laboratory\", practitionerRole);\r",
									"console.log(practitionerRole)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "practitioner",
									"value": "{{PractitionerId_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать структурное подразделение врача лаборатории (LocationId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"let json = pm.response.json();\r",
									"let locationValue = null;\r",
									"\r",
									"if (Array.isArray(json.entry)) {\r",
									"    for (let entry of json.entry) {\r",
									"        if (\r",
									"            entry.resource &&\r",
									"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
									"            Array.isArray(entry.resource.location) &&\r",
									"            entry.resource.location.length > 0\r",
									"        ) {\r",
									"            // Берём reference первого location и извлекаем только UUID\r",
									"            let ref = entry.resource.location[0].reference;\r",
									"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
									"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
									"            }\r",
									"            break;\r",
									"        }\r",
									"    }\r",
									"}\r",
									"\r",
									"if (locationValue) {\r",
									"    pm.environment.set(\"LocationId_laboratory\", locationValue);\r",
									"    console.log(\"location сохранён:\", locationValue);\r",
									"} else {\r",
									"    console.log(\"location не найден\");\r",
									"}\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "_id",
									"value": "{{PractitionerRole_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let servicerequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.environment.set(\"ServiceRequestId\", servicerequestId);\r",
									"console.log(servicerequestId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code-concept=gynecology-cytology",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code-concept",
									"value": "gynecology-cytology"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let specimenId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.environment.set(\"SpecimenId\", specimenId);\r",
									"console.log(specimenId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated&identifier=25.2025&assigner={{OrganizationId}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "identifier",
									"value": "25.2025"
								},
								{
									"key": "assigner",
									"value": "{{OrganizationId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleGynecologyFromLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-12T17:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionGynecologyFromLabTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientWomenTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-12T17:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle заключения по жидкостной цитологии\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleGynecologyReportTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientWomenTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientWomenTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleGynecologyReportTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleGynecologyReportTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1444.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{ServiceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ResearchMethodsTypeA\",\r\n                            \"code\": \"A08-20-012\",\r\n                            \"display\": \"Цитологическое исследование препарата тканей влагалища\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientWomenTest\"\r\n                },\r\n                \"issued\": \"2025-12-12T16:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/{{SpecimenId}}\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Цитограмма представлена клетками цилиндрического и плоского эпителия без признаков атипии (NILM)\",\r\n                \"conclusionCode\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MicroscopicDescription\",\r\n                                \"valueString\": \"Диффузное трансмуральное воспаление с массивной нейтрофильной инфильтрацией всех слоев стенки (от слизистой до серозной оболочки)\"\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"gynecology-cytology\",\r\n                                \"display\": \"Исследование цервико-вагинальных мазков\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Заключения цитологического исследования",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code=A08-20-012",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"DiagnosticReport"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code",
									"value": "A08-20-012"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "3. Цитологическое исследование пунктата щитовидной железы",
			"item": [
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleThyroidToLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-20T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionThyroidTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionThyroidTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterSurgeonTest\"\r\n                },\r\n                \"date\": \"2025-12-20T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для жидкостной цитологии\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ThyroidNoduleDiagnosisTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ServiceRequest/ExampleThyroidCytologyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Specimen/ExampleSpecimenBiopsyThyroidTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Procedure/ThyroidPunctureTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ThyroidNoduleDiagnosisTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ThyroidNoduleDiagnosisTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Clinical\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-20T14:15:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"chronic\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E04.1\",\r\n                            \"display\": \"E04.1 - Нетоксический одноузловой зоб\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-20\",\r\n                \"recordedDate\": \"2025-12-20\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Encounter/EncounterSurgeonTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Encounter\",\r\n                \"id\": \"EncounterSurgeonTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/EncounterGeneral\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterConclusion\",\r\n                        \"valueString\": \"Нетоксический одноузловой зоб, выполнена биопсия, образец направлен на цитологическое исследование\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfVisit\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfVisit\",\r\n                                    \"code\": \"primary\",\r\n                                    \"display\": \"первичное обращение\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"class\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                \"code\": \"1\",\r\n                                \"display\": \"амбулаторные\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/HealthCareForms\",\r\n                            \"code\": \"planned\",\r\n                            \"display\": \"Плановая медицинская помощь\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"special\",\r\n                                \"display\": \"Специализированная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"serviceProvider\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"actualPeriod\": {\r\n                    \"start\": \"2025-12-20T14:00:21Z\",\r\n                    \"end\": \"2025-12-20T14:25:21Z\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/EncounterReasons\",\r\n                                        \"code\": \"consult\",\r\n                                        \"display\": \"врачебная консультация\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ThyroidNoduleDiagnosisTest\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                        \"code\": \"mainDiagnosis\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleThyroidCytologyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleThyroidCytologyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/UltrasoundResult\",\r\n                                        \"valueString\": \"Солидно-кистозный узел 19*20*22 мм, перешейка щитовидной железы\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TiradsScore\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TiradsScore\",\r\n                                                    \"code\": \"tirads-2\",\r\n                                                    \"display\": \"доброкачественные изменения щитовидной железы\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/LastHormoneValue\",\r\n                                        \"valueString\": \"Т3своб. - 5 пг/мл от 2025-03-03\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ThyroidGlandCytology\"\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfResearch\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C063\",\r\n                                    \"display\": \"Эндокринология\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PurposeOfResearch\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PurposeOfResearch\",\r\n                                    \"code\": \"primary-research\",\r\n                                    \"display\": \"первичное исследование\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"13\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"thyroid-cytology\",\r\n                                \"display\": \"Цитологическое исследование материала из щитовидной железы\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterSurgeonTest\"\r\n                },\r\n                \"authoredOn\": \"2025-12-20T14:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ThyroidNoduleDiagnosisTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"supportingInfo\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HormoneTherapy\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/HormonalDrugName\",\r\n                                        \"valueString\": \"Эутирокс\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/HormonePeriod\",\r\n                                        \"valuePeriod\": {\r\n                                            \"start\": \"2022-05-01\"\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HormonotherapyDetails\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/EndocrinologistObservation\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2022-05-01\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/ExampleSpecimenBiopsyThyroidTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Specimen/ExampleSpecimenBiopsyThyroidTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Specimen\",\r\n                \"id\": \"ExampleSpecimenBiopsyThyroidTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/BioMatSpecimen\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"26.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSBiologicalMaterial\",\r\n                            \"code\": \"12.5.6\",\r\n                            \"display\": \"Аспират иной локализации\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"collection\": {\r\n                    \"procedure\": {\r\n                        \"reference\": \"Procedure/ThyroidPunctureTest\"\r\n                    },\r\n                    \"bodySite\": {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                    \"code\": \"Superior-segment-of-right-lobe\",\r\n                                    \"display\": \"Верхний сегмент (полюс) правой доли щитовидной железы\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ThyroidPunctureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ThyroidPunctureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/SurgicalProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TermsOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                    \"code\": \"1\",\r\n                                    \"display\": \"амбулаторные\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AnesthesiaType\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnesthesiaType\",\r\n                                    \"code\": \"local\",\r\n                                    \"display\": \"местная анестезия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureUrgency\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureUrgency\",\r\n                                    \"code\": \"planned\",\r\n                                    \"display\": \"Плановое\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"13588\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ProcedureType\",\r\n                                \"code\": \"diagnostic\",\r\n                                \"display\": \"Диагностическая\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/SurgicalInterventions\",\r\n                            \"code\": \"BAA00K\",\r\n                            \"display\": \"Пункционная биопсия щитовидной железы\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Пункционная биопсия щитовидной железы\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"encounter\": {\r\n                    \"reference\": \"Encounter/EncounterSurgeonTest\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-12-20T14:05:00Z\",\r\n                    \"end\": \"2025-12-20T14:15:00Z\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"operator\",\r\n                                    \"display\": \"врач-хирург оперирующий\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-12-20T14:05:00Z\",\r\n                            \"end\": \"2025-12-20T14:15:00Z\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"postoperative\",\r\n                                    \"display\": \"Диагноз после вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ThyroidNoduleDiagnosisTest\"\r\n                        }\r\n                    } \r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"После обработки операционного поля выполнено местное обезболивание. Под УЗИ-контролем выполнена тонкоигольная пункция щитовидной железы. \\nАсептическая повязка. Образец биоиатериале направлен на цитологическое исследование. Осложнений во время операции не было\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "4. Заключение цитологического исследования пунктата",
			"item": [
				{
					"name": "Достать врача и организацию из токена врача лаборатории (PractitionerId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
									"console.log(jwt);\r",
									"if (jwt) {\r",
									"    let payload = jwt.split('.')[1];\r",
									"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
									"    while (payload.length % 4) payload += '=';\r",
									"    let decoded = JSON.parse(atob(payload));\r",
									"    console.log(decoded)\r",
									"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
									"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
									"    if (practitionerId) pm.environment.set(\"PractitionerId_laboratory\", practitionerId);\r",
									"    if (organizationId) pm.environment.set(\"OrganizationId_laboratory\", organizationId);\r",
									"} else {\r",
									"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
									"}"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "0.3.4934",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://postman-echo.com/get",
							"protocol": "https",
							"host": [
								"postman-echo",
								"com"
							],
							"path": [
								"get"
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать PractitionerRole врача лаборатории (PractitionerRole_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
									"\r",
									"pm.environment.set(\"PractitionerRole_laboratory\", practitionerRole);\r",
									"console.log(practitionerRole)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "practitioner",
									"value": "{{PractitionerId_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать структурное подразделение врача лаборатории (LocationId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"let json = pm.response.json();\r",
									"let locationValue = null;\r",
									"\r",
									"if (Array.isArray(json.entry)) {\r",
									"    for (let entry of json.entry) {\r",
									"        if (\r",
									"            entry.resource &&\r",
									"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
									"            Array.isArray(entry.resource.location) &&\r",
									"            entry.resource.location.length > 0\r",
									"        ) {\r",
									"            // Берём reference первого location и извлекаем только UUID\r",
									"            let ref = entry.resource.location[0].reference;\r",
									"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
									"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
									"            }\r",
									"            break;\r",
									"        }\r",
									"    }\r",
									"}\r",
									"\r",
									"if (locationValue) {\r",
									"    pm.environment.set(\"LocationId_laboratory\", locationValue);\r",
									"    console.log(\"location сохранён:\", locationValue);\r",
									"} else {\r",
									"    console.log(\"location не найден\");\r",
									"}\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "_id",
									"value": "{{PractitionerRole_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let servicerequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.environment.set(\"ServiceRequestId\", servicerequestId);\r",
									"console.log(servicerequestId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code-concept=thyroid-cytology",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code-concept",
									"value": "thyroid-cytology"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let specimenId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.environment.set(\"SpecimenId\", specimenId);\r",
									"console.log(specimenId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated&identifier=26.2025&assigner={{OrganizationId}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "identifier",
									"value": "26.2025"
								},
								{
									"key": "assigner",
									"value": "{{OrganizationId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleThyroidFromLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-21T17:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionThyroidFromLabTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionThyroidFromLabTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-21T17:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle заключения по цитологического исследования материала из щитовидной железы\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleThyroidReportTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleThyroidReportTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleThyroidReportTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1470.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{ServiceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ResearchMethodsTypeA\",\r\n                            \"code\": \"A08-22-004\",\r\n                            \"display\": \"Цитологическое исследование препарата тканей щитовидной железы\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-21T16:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/{{SpecimenId}}\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Коллоидный зоб\",\r\n                \"conclusionCode\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MicroscopicDescription\",\r\n                                \"valueString\": \"клетки фолликулярного эпителия, без признаков атипии\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/BethesdaThyroid\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/BethesdaThyroid\",\r\n                                            \"code\": \"7\",\r\n                                            \"display\": \"Коллоидный зоб\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"thyroid-cytology\",\r\n                                \"display\": \"Цитологическое исследование материала из щитовидной железы\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Заключения цитологического исследования",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code=A08-22-004",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"DiagnosticReport"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code",
									"value": "A08-22-004"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "5. Цитологическое исследование отделяемого плевральной полости. Стационар",
			"item": [
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleCytologyPleuralToLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-25T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionCytologyPleuralTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-25T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для отделяемого плевральной полости\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/EmphysemaDiagnosisTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ServiceRequest/ExampleCytologyPleuralFluidTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Specimen/ExampleSpecimenPleuralFluidTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/EmphysemaDiagnosisTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"EmphysemaDiagnosisTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Clinical\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-25T14:15:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"chronic\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"J43.1\",\r\n                            \"display\": \"J43.1 - Панлобулярная эмфизема\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-25\",\r\n                \"recordedDate\": \"2025-12-25\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Буллёзная трансформация левого лёгкого. Операция от 09.12.2025, торакоскопическая лобэктомия с применением аппаратного шва и современных методов гемостаза. Хилоторакс?\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleCytologyPleuralFluidTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleCytologyPleuralFluidTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C042\",\r\n                                    \"display\": \"Пульмонология\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PurposeOfResearch\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PurposeOfResearch\",\r\n                                    \"code\": \"primary-research\",\r\n                                    \"display\": \"первичное исследование\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"142\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/2\",\r\n                                \"display\": \"Стационарная медицинская диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"general-cytology\",\r\n                                \"display\": \"Цитологическое исследование любого биологического материала\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"authoredOn\": \"2025-12-25T14:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/EmphysemaDiagnosisTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/ExampleSpecimenPleuralFluidTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Specimen/ExampleSpecimenPleuralFluidTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Specimen\",\r\n                \"id\": \"ExampleSpecimenPleuralFluidTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/BioMatSpecimen\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"27.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSBiologicalMaterial\",\r\n                            \"code\": \"12.6.9\",\r\n                            \"display\": \"Плевральная жидкость\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"collection\": {\r\n                    \"collector\": {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    },\r\n                    \"collectedDateTime\": \"2025-12-25T13:20:00Z\",\r\n                    \"quantity\": {\r\n                        \"value\": 8,\r\n                        \"unit\": \"мл\"\r\n                    },\r\n                    \"method\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/MethodOfObtaining\",\r\n                                \"code\": \"other\",\r\n                                \"display\": \"иное\"\r\n                            }\r\n                        ],\r\n                        \"text\": \"отделяемое из левого плеврального дренажа\"\r\n                    },\r\n                    \"bodySite\": {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                    \"code\": \"Pleural-cavity\",\r\n                                    \"display\": \"Плевральная полость\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                },\r\n                \"processing\": [\r\n                    {\r\n                        \"method\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ColoringMicropreparations\",\r\n                                    \"code\": \"Native\",\r\n                                    \"display\": \"Не окрашивался\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"condition\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/StateOfSpecimen\",\r\n                                \"code\": \"CFU\",\r\n                                \"display\": \"Центрифугирован\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "6. Заключение цитологического исследования отделяемого плевральной полости",
			"item": [
				{
					"name": "Достать врача и организацию из токена врача лаборатории (PractitionerId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"const jwt = pm.request.auth?.oauth2?.get(\"accessToken\") || pm.request.auth?.bearer?.get(\"token\") || null;\r",
									"console.log(jwt);\r",
									"if (jwt) {\r",
									"    let payload = jwt.split('.')[1];\r",
									"    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
									"    while (payload.length % 4) payload += '=';\r",
									"    let decoded = JSON.parse(atob(payload));\r",
									"    console.log(decoded)\r",
									"    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
									"    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
									"    if (practitionerId) pm.environment.set(\"PractitionerId_laboratory\", practitionerId);\r",
									"    if (organizationId) pm.environment.set(\"OrganizationId_laboratory\", organizationId);\r",
									"} else {\r",
									"    console.log(\"JWT токен не найден в переменных коллекции\");\r",
									"}"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "0.3.4934",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "https://postman-echo.com/get",
							"protocol": "https",
							"host": [
								"postman-echo",
								"com"
							],
							"path": [
								"get"
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать PractitionerRole врача лаборатории (PractitionerRole_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r",
									"\r",
									"pm.environment.set(\"PractitionerRole_laboratory\", practitionerRole);\r",
									"console.log(practitionerRole)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?practitioner={{PractitionerId_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "practitioner",
									"value": "{{PractitionerId_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Достать структурное подразделение врача лаборатории (LocationId_laboratory)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"let json = pm.response.json();\r",
									"let locationValue = null;\r",
									"\r",
									"if (Array.isArray(json.entry)) {\r",
									"    for (let entry of json.entry) {\r",
									"        if (\r",
									"            entry.resource &&\r",
									"            entry.resource.resourceType === \"PractitionerRole\" &&\r",
									"            Array.isArray(entry.resource.location) &&\r",
									"            entry.resource.location.length > 0\r",
									"        ) {\r",
									"            // Берём reference первого location и извлекаем только UUID\r",
									"            let ref = entry.resource.location[0].reference;\r",
									"            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r",
									"                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r",
									"            }\r",
									"            break;\r",
									"        }\r",
									"    }\r",
									"}\r",
									"\r",
									"if (locationValue) {\r",
									"    pm.environment.set(\"LocationId_laboratory\", locationValue);\r",
									"    console.log(\"location сохранён:\", locationValue);\r",
									"} else {\r",
									"    console.log(\"location не найден\");\r",
									"}\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/PractitionerRole?_id={{PractitionerRole_laboratory}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"PractitionerRole"
							],
							"query": [
								{
									"key": "_id",
									"value": "{{PractitionerRole_laboratory}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Поиск пациента по идентификатору (patientId)",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
									"\r",
									"pm.environment.set(\"patientId\", patientId);\r",
									"console.log(patientId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient?identifier=7551273A009PB9",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient"
							],
							"query": [
								{
									"key": "identifier",
									"value": "7551273A009PB9"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Направления на цитологическое исследование",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let servicerequestId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.environment.set(\"ServiceRequestId\", servicerequestId);\r",
									"console.log(servicerequestId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code-concept=general-cytology",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code-concept",
									"value": "general-cytology"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Образца биологического материала",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let specimenId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.environment.set(\"SpecimenId\", specimenId);\r",
									"console.log(specimenId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}&_sort=-_lastUpdated&identifier=27.2025&assigner={{OrganizationId}}",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "identifier",
									"value": "27.2025"
								},
								{
									"key": "assigner",
									"value": "{{OrganizationId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод импорта пакета медицинской информации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundlePleuralFluidFromLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-27T17:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionPleuralFluidFromLabTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionPleuralFluidFromLabTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-27T17:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle заключения по цитологического исследования отделяемого плевральной полости\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExamplePleuralFluidReportTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551273A009PB9\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.4\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334501\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванова\",\r\n                        \"given\": [\r\n                            \"Алла\",\r\n                            \"Викторовна\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.2\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748411\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"female\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Минск, г. Минск, Улица Золотая Горка\",\r\n                        \"line\": [\r\n                            \"Улица Золотая Горка\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.31\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Минск, г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExamplePleuralFluidReportTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExamplePleuralFluidReportTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"14953.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{ServiceRequestId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/2\",\r\n                                \"display\": \"Стационарная медицинская диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ResearchMethodsTypeA\",\r\n                            \"code\": \"A09-09-002\",\r\n                            \"display\": \"Цитологическое исследование плевральной жидкости\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-27T16:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerId_laboratory}}\"\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/{{SpecimenId}}\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"цитоз > 1000/мкл; ТГ 1,6 ммоль/л; лимфоциты 85%\",\r\n                \"conclusionCode\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"general-cytology\",\r\n                                \"display\": \"Цитологическое исследование любого биологического материала\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/$import",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия Заключения цитологического исследования",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated&code=A09-09-002",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"DiagnosticReport"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								},
								{
									"key": "code",
									"value": "A09-09-002"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение сводной информации о пациенте",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Patient/{{patientId}}/$everything?start=2025-12&end=2026-02",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Patient",
								"{{patientId}}",
								"$everything"
							],
							"query": [
								{
									"key": "start",
									"value": "2025-12"
								},
								{
									"key": "end",
									"value": "2026-02"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Отмена импорта медицинской информации",
			"item": [
				{
					"name": "Отмена импорта медицинской информации",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$cancel",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$cancel"
							]
						}
					},
					"response": []
				},
				{
					"name": "Получение статуса импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "https://pp.cisz.by/api/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "https",
							"host": [
								"pp",
								"cisz",
								"by"
							],
							"path": [
								"api",
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"auth": {
		"type": "oauth2",
		"oauth2": [
			{
				"key": "useBrowser",
				"value": true,
				"type": "boolean"
			},
			{
				"key": "redirect_uri",
				"value": "https://oauth.pstmn.io/v1/callback",
				"type": "string"
			},
			{
				"key": "clientId",
				"value": "mis_agsr_web_application",
				"type": "string"
			},
			{
				"key": "tokenRequestParams",
				"value": [
					{
						"key": "origin",
						"value": "https://oauth.pstmn.io/v1/callback",
						"enabled": true,
						"send_as": "request_header"
					}
				],
				"type": "any"
			},
			{
				"key": "scope",
				"value": "profile email acr realm roles",
				"type": "string"
			},
			{
				"key": "accessTokenUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/token",
				"type": "string"
			},
			{
				"key": "authUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/auth",
				"type": "string"
			},
			{
				"key": "clientSecret",
				"value": "",
				"type": "string"
			},
			{
				"key": "grant_type",
				"value": "authorization_code_with_pkce",
				"type": "string"
			},
			{
				"key": "refreshRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "authRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "challengeAlgorithm",
				"value": "S256",
				"type": "string"
			},
			{
				"key": "addTokenTo",
				"value": "header",
				"type": "string"
			},
			{
				"key": "client_authentication",
				"value": "body",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "practitioner_id",
			"value": ""
		},
		{
			"key": "organization_id",
			"value": ""
		},
		{
			"key": "locationId",
			"value": ""
		},
		{
			"key": "patientId",
			"value": ""
		},
		{
			"key": "bundleId",
			"value": ""
		},
		{
			"key": "StatusUrl",
			"value": ""
		}
	]
}